<template>
	<view class="content">
		<view class="navBar">
			<view class="left">
				<navigator url="../all-activities/all-activities" open-type="switchTab">
					<uni-icons class="right-icon" type="arrowleft" size="20" color="#fff"></uni-icons>
				</navigator>
				
			</view>
			<view class="center">
				<text class="uni-tab-item-title">{{kindName}}</text>
				<!-- <view v-for="(item,index) in top_tab" :key='index' :id="index" class="uni-tab-item"
					@click="tabTap">
					<text class="uni-tab-item-title"
						:class="toptab==index ? 'uni-tab-item-title-active' : ''">{{item}}</text>
				</view> -->
			</view>
			<view class="right">
				<uni-icons class="right-icon" type="search" size="20" color="#fff"></uni-icons>
				<uni-icons class="right-icon" type="email" size="20" color="#fff"></uni-icons>
			</view>
		</view>
		<view style="width: 100%;height: 90rpx;"></view>
		
		<view class="choose-new-hot" >
			<text v-for="(item,index) in chooseItems" @click="onClickItem" :id="index"  class="new-hot" :class="chooseIndex == index ? 'new-hot-active' : ''">{{item}}</text>
		</view>
		<view class="new" v-if="chooseIndex == 0">
			<view class="interest-card" v-for="(item,index) in act">
				<view class="img"><image :src="item.acturl"></image></view>
				<view class="text">
					<view class="int-card-text">
						<view class="name"><text>{{item.actname}}</text></view>
						<view><text>{{item.acttime}}</text></view>
						<view><text>{{item.actplace}}</text></view>
					</view>
					<view class="int-card-label">
						<view class="label" v-for=" item in label">{{item}}</view>
					</view>
				</view>
				
			</view>
		</view>
		<view class="hot" v-if="chooseIndex == 1">
			<view class="interest-card" v-for="(item,index) in act">
				<view class="img"><image :src="item.acturl"></image></view>
				<view class="text">
					<view class="int-card-text">
						<view class="name"><text>{{item.actname}}</text></view>
						<view><text>{{item.acttime}}</text></view>
						<view><text>{{item.actplace}}</text></view>
					</view>
					<view class="int-card-label">
						<view class="label" v-for=" item in label">{{item}}</view>
					</view>
				</view>
				
			</view>
		</view>
		
	</view>
</template>

<script>
	export default{
		data(){
			return{
				kindName:'音乐会',
				chooseItems:['最新','最热'],
				chooseIndex:0,
				act:[
					{
						id:1,
						acturl:"../../../static/swiper/1.jpg",
						actname:"灵感事务所",
						acttime:"2020.09.30-2020.12.31",
						actplace:"杭州  |  杭州天地二层L201"
					},
					{
						id:2,
						acturl:"../../../static/swiper/2.jpg",
						actname:"灵感事务所",
						acttime:"2020.09.30-2020.12.31",
						actplace:"杭州  |  杭州天地二层L201"
					},
					{
						id:3,
						acturl:"../../../static/swiper/3.jpg",
						actname:"灵感事务所",
						acttime:"2020.09.30-2020.12.31",
						actplace:"杭州  |  杭州天地二层L201"
					},
					{
						id:4,
						acturl:"../../../static/swiper/4.jpg",
						actname:"灵感事务所",
						acttime:"2020.09.30-2020.12.31",
						actplace:"杭州  |  杭州天地二层L201"
					}
				],
				label:["娱乐","美国","流行"]
			}
		},
		methods:{
			onClickItem(e) { 
				this.chooseIndex = e.currentTarget.id
			}
		}
	}
</script>

<style lang="scss">
	.content {
		width: 100%;
		height: 100%;
		// 导航栏
		.navBar{
			width: 100%;
			height: 90rpx;
			display: flex;
			background-color: #B0E3FF;
			position: fixed;
			z-index: 1000;
			.left{
				display: inline-block;
				height: 100%;
				width: 200rpx;
				.right-icon{
					margin-left: 20rpx;
					line-height: 90rpx;
				}
			}
			.center{
				display: inline-block;
				height: 100%;
				flex: 1;
				text-align: center;
				.uni-tab-item {
					/* #ifndef APP-PLUS */
					display: inline-block;
					/* #endif */
					flex-wrap: nowrap;
					padding-left: 10rpx;
					padding-right: 10rpx;
				}
				.uni-tab-item-title {
					color: #FFFFFF;
					font-size: 30rpx;
					font-weight: bold;
					height: 80rpx;
					line-height: 80rpx;
					flex-wrap: nowrap;
					/* #ifndef APP-PLUS */
					white-space: nowrap;
					/* #endif */
				
				}
				.uni-tab-item-title-active {
					color: #FFFFFF;
					font-weight: bold;
					font-size: 40rpx;
					// border-bottom: solid #797979;
				}
			}
			.right{
				display: inline-block;
				height: 100%;
				width: 200rpx;
				.right-icon{
					margin-left: 20rpx;
					line-height: 90rpx;
				}
			}
			
		}
		.choose-new-hot{
			width: 100%;
			height: 100rpx;
			margin-top: 20rpx;
			.new-hot{
				margin-left: 30rpx;
				color: #555555;
				font-size: 40rpx;
				
			}
			.new-hot-active{
				margin-left: 30rpx;
				color: #B0E3FF;
				font-size: 50rpx;
				font-weight: bold;
			}
		}
		.interest-card{
			margin: 20rpx 30rpx 20rpx 30rpx;
			height: 440rpx;
			border-radius: 20rpx;
			box-shadow: 0px 2px 1px rgba(200,200,200,.30);
			.img{
				display: inline-block;
				image{
					margin: 10rpx 10rpx 10rpx 10rpx;
					width: 280rpx;
					height: 400rpx;
					border-radius: 20rpx;
				}
			}
			.text{
				display: inline-block;
				vertical-align: top;
				margin-top: 20rpx;
				.int-card-text{
					text-align: center;
					color: #797979;
					font-size: 30rpx;
					margin-top: 20rpx;
					line-height: 50rpx;
					margin-bottom: 20rpx;
					.name{
						text-align: center;
						color: #333333;
						font-weight: bold;
						font-size: 40rpx;
						line-height: 60rpx;
						margin-top: 20rpx;
						margin-bottom: 20rpx;
					}
				}
				.int-card-label{
					vertical-align: middle;
					margin-top: 20rpx;
					.label{
						width: 100rpx;
						height: 40rpx;
						display: inline-block;
						border: 1px solid #B0E3FF;
						color: #B0E3FF;
						border-radius: 20rpx;
						text-align: center;
					}
				}
			}
			
		}
	}
</style>
